package in.muton.edushare.pages.univ;

import in.muton.edushare.pages.batch.BatchList;
import in.muton.edushare.wicket.models.CayenneModel;

import org.apache.wicket.PageParameters;

import com.edushare.common.constants.ApplicationConstants;
import com.edushare.common.dao.CurriculumDAO;
import com.edushare.common.vo.Curricula;

public class UnivBatches extends UnivBase {

	public UnivBatches(PageParameters params) {
		super(params);
		int cNo = params.getAsInteger("1", 0);
		Curricula c = new CurriculumDAO(getSessionORMInterface())
				.getCurriculaById(cNo);
		CayenneModel<Curricula> cModel = (c == null) ? null
				: new CayenneModel<Curricula>(c);
		add(new BatchList("panel", this, getModel().getObject(), cModel));
	}

	@Override
	public String getActivePage(PageParameters p) {
		return "UnivBatches";
	}

	@Override
	public String getPageTitle() {
		return getLoggedInUser().getCompleteUserName() + " | "
				+ getModel().getObject().getUniversityName() + " | Batches | "
				+ ApplicationConstants.APPLICATION_NAME;
	}

}
